package com.yiren.backstage.communication.api.impl;

import android.content.Context;

import com.yiren.backstage.communication.api.AbstractCommunication;
import com.yiren.backstage.communication.services.impl.SerialPortServiceImpl;
import com.yiren.backstage.currency.constant.DeviceConnectTypeConstant;
import com.yiren.backstage.currency.constant.SignalGConstant;

/**
 * Time:2021/12/23 14:45
 * Author:xiaozan
 * Description:串口通讯api 实现
 */
public class SerialCommunicationApiImpl extends AbstractCommunication {

    private static SerialCommunicationApiImpl serialCommunicationApi;

    public static SerialCommunicationApiImpl getInstance(Context context) {
        if (null == serialCommunicationApi) {
            serialCommunicationApi = new SerialCommunicationApiImpl(context);
        }
        return serialCommunicationApi;
    }

    public SerialCommunicationApiImpl(Context context) {
        super(context, DeviceConnectTypeConstant.TYPE_SERIAL);
        abstractPortService = new SerialPortServiceImpl();
    }
}
